# -*- coding:utf-8 -*-

from . import project
from flask import render_template,session,abort
from admin_model import Code_1,Table_show
from project_zczh.tool.common import login_check
import datetime

@project.route('/table/<int:id_>')
@login_check
def table_more(id_):
    now=datetime.datetime.now().strftime('%Y-%m-%d')
    try:
        content_list=Table_show.query.filter_by(table_class_id=int(id_),mark=1).all()
    except :
        abort(500)
    try:
        code=Code_1.query.filter_by(id=int(id_)).all()[0]
    except:
        abort(500)

    return render_template('table_list.html',content_list=content_list,code=code,now=now)